package com.ihai.spring.boot.sample.zookeeper;

import com.google.common.collect.Lists;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryOneTime;
import org.apache.curator.utils.CloseableUtils;
import org.apache.curator.x.discovery.ServiceDiscovery;
import org.apache.curator.x.discovery.ServiceDiscoveryBuilder;
import org.apache.curator.x.discovery.ServiceInstance;
import org.apache.curator.x.discovery.ServiceProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

import java.io.Closeable;
import java.util.Collections;
import java.util.List;

/**
 * DESC
 *
 * @author 张驰
 * @date 2019/6/4
 */
public class ZkServiceProvider {
    public static void main(String[] args) throws Exception {
        String host = "192.168.16.222";
        String port = "2181";
        ZkService service = new ZkService();
        service.start(host,port,"/esb/test","zkServiceProvider","http://127.0.0.1:8080");
//        service.close();
    }
}
